﻿using UnityEngine;
using System.Collections;

public class BestDownSpawn : MonoBehaviour
{


    // 敌人的Prefab
    public Transform m_enemy;

    // 生成敌人的间隔时间
    protected float m_timer = 160;

    protected Transform m_transform;

    // Use this for initialization
    void Start()
    {
        m_transform = this.transform;
    }

    // Update is called once per frame
    void Update()
    {

        m_timer -= Time.deltaTime;
        if (m_timer <= 0)
        {

            m_timer = 8;


            Instantiate(m_enemy, m_transform.position, Quaternion.identity);
        }
    }

    //显示图标
    void OnDrawGizmos()
    {

        Gizmos.DrawIcon(transform.position, "item.png", true);
    }
}
